package com.xjtu.chapter05.ex5_2;

/**
 * @author yjq
 * @version 1.0
 * @date 2021/8/16 16:00
 */
public class MovieStar extends Star implements CanPerform,CanDance,CanSing {

    String famousMovie;

    public MovieStar(String name, int age, char sex,String famousMovie) {
        super(name, age, sex);
        this.famousMovie = famousMovie;
    }

    @Override
    public void dance() {
        System.out.println("MovieStar:Dance");
    }

    @Override
    public void perform() {
        System.out.println("MovieStar:Perform");
    }

    @Override
    public void sing() {
        System.out.println("MovieStar:Sing");
    }

    @Override
    public String toString() {
        return super.toString()+", "+
                "famousMovie='" + famousMovie+"'" ;
    }
}
